home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 1.5)
-
- import Blood
- import MenuWidget
- import WidgetsExtra
- import Bladex
- import BBLib
- import netgame
- import Raster
- import BIPCx
- import Sounds
- import GotoMapVars
- import acts
- import SaveGame
- import MemPersistence
- import string
- if netgame.GetNetState() == 0:
- import KeybWidget
- import Credits
- else:
- import NetScorer
- import Raster
- import BInput
- import BUIx
- import pdb
- import Reference
- import MenuText
- import NetMisc
- import netwidgets
- import os
- MenuFontSmall = '../../Data/Letras menu peq.bmp'
- MenuFontMed = '../../Data/Letras menu med.bmp'
- MenuFontBig = '../../Data/Letras menu gra.bmp'
- Character = -1
- TBUDSoundAble = 1
- EscapeFunction = None
- SndCorreGema = Bladex.CreateSound('..\\..\\Sounds\\golpe-2.wav', 'Risoto1')
- SndCorreGema.Volume = 0.5
- SndCorreGema.MinDistance = 1000000.0
- SndCorreGema.MaxDistance = 2000000
- SndNewMenu = Bladex.CreateSound('..\\..\\Sounds\\golpe-madera-pesada.wav', 'Risoto2')
- SndNewMenu.Volume = 1.0
- SndNewMenu.MinDistance = 1000000.0
- SndNewMenu.MaxDistance = 2000000
- last_ss_quality = -1
- sound_cfg_changed = 0
-
- def PlaySound(Chound):
- cam = Bladex.GetEntity('Camera')
- Chound.Position = cam.Position
- Chound.Stop()
- Chound.PlaySound(0)
-
-
- def BackMenu(option):
- _MainMenu.DeActivateMenuItem()
-
- BackOption = {
- 'Name': MenuText.GetMenuText('BACK'),
- 'VSep': 65,
- 'Command': BackMenu,
- 'Font': MenuFontBig }
-
- def Load2DMap(option):
- Bladex.LoadLevel('2DMap')
-
-
- def LoadPlayerSelect(option):
- global EscapeFunction, EscapeFunction
- if 'Casa' != Bladex.GetCurrentMap():
- MemPersistence.Store('MapAlreadyLoaded', 'pepepotamo')
- Bladex.LoadLevel('Casa')
- else:
- aux = EscapeFunction
- EscapeFunction = None
- _MainMenu.DeActivateMenuItem()
- _MainMenu.DeActivateMenuItem()
- EscapeFunction = aux
- aux = None
- EscapeFunction(1)
-
-
- def LoadTutorial(option):
- Bladex.LoadLevel('Tutorial')
-
-
- def SaveGame1(option):
- Bladex.SetRunString("Bladex.StopTime();import GameState;state=GameState.WorldState();state.GetState();state.SaveState('../../Save/SaveGame1.py');state=None")
-
-
- def SaveGame2(option):
- Bladex.SetRunString("Bladex.StopTime();import GameState;state=GameState.WorldState();state.GetState();state.SaveState('../../Save/SaveGame2.py');state=None")
-
-
- def SaveGame3(option):
- Bladex.SetRunString("Bladex.StopTime();import GameState;state=GameState.WorldState();state.GetState();state.SaveState('../../Save/SaveGame3.py');state=None")
-
-
- def SaveGame4(option):
- Bladex.SetRunString("Bladex.StopTime();import GameState;state=GameState.WorldState();state.GetState();state.SaveState('../../Save/SaveGame4.py');state=None")
-
-
- def LoadGameAux(name):
- path = '../../Save/%s_files' % (name,)
- execfile = "execfile('../../Scripts/sys_init.py');execfile('../../Save/%s.py')" % (name,)
- file_data_aux = open('%s/%saux' % (path, 'aux'), 'rt')
- text = file_data_aux.read()
- print text
- file_data_aux.close()
- Bladex.BeginLoadGame()
- Bladex.CloseLevel(execfile, text)
-
-
- def LoadGame(option):
- LoadGameAux('SaveGame1')
-
-
- def LoadGame2(option):
- LoadGameAux('SaveGame2')
-
-
- def LoadGame3(option):
- LoadGameAux('SaveGame3')
-
-
- def LoadGame4(option):
- LoadGameAux('SaveGame4')
-
-
- def CmdQuit(menu_class):
- Bladex.Quit()
-
-
- def CommandPrb(menu_class):
- print 'Hola'
-
-
- def OptionCommandPrb(menu_class, option):
- print 'Received', option
-
-
- def SetOptionCommandPrb():
- return 'Off'
-
-
- def SetFullScreenMode(option):
- print option
- if option == 'Full Screen':
- Raster.SetVideoMode(0)
- else:
- Raster.SetWindowSize(640, 480)
-
-
- def FullScreenModeSettings():
- print 'FullScreenModeSettings'
- if Raster.FullScreen():
- return 0
- else:
- return 1
-
-
- def SetFacing(option):
- if option == 'Yes':
- Bladex.SetAutoEngageCombat(1)
- else:
- Bladex.SetAutoEngageCombat(0)
- SaveConfiguration()
-
-
- def GetFacing():
- return Bladex.GetAutoEngageCombat()
-
-
- def FacingSettings():
- if Bladex.GetAutoEngageCombat():
- return 1
- else:
- return 0
-
- GORE_PASSWORD = ''
- NEW_GORE_PASSWORD = ''
- CONFIRM_GORE_PASSWORD = ''
- CORRECT_GORE_PASSWORD = ''
-
- def LoadPasswordFile():
- global CORRECT_GORE_PASSWORD
- import rotor
-
- try:
- passwordfile = open('..\\..\\Bin\\Password.txt', 'r')
- except:
- return None
-
- encrpass = passwordfile.read()
- passwordfile.close()
- rt = rotor.newrotor('key', 12)
- CORRECT_GORE_PASSWORD = rt.decrypt(encrpass)
- del rt
-
- LoadPasswordFile()
-
- def SavePasswordFile():
- import rotor
- rt = rotor.newrotor('key', 12)
- encrpass = rt.encrypt(CORRECT_GORE_PASSWORD)
- del rt
- passwordfile = open('..\\..\\Bin\\Password.txt', 'w')
- passwordfile.write(encrpass)
- passwordfile.close()
-
-
- def GetMouseInvert():
- MouseData = Bladex.GetMouseState()
- return 1 - MouseData[0]
-
-
- def SetMouseInvert(option):
- MouseData = Bladex.GetMouseState()
- if option == 'No':
- Bladex.SetMouseState(0, MouseData[1], MouseData[2])
- else:
- Bladex.SetMouseState(1, MouseData[1], MouseData[2])
- KeybWidget.SaveListConfig()
-
-
- def GetMouseXSens():
- MouseData = Bladex.GetMouseState()
- return int(MouseData[1])
-
-
- def SetMouseXSens(v):
- MouseData = Bladex.GetMouseState()
- Bladex.SetMouseState(MouseData[0], v, MouseData[2])
- KeybWidget.SaveListConfig()
-
-
- def GetMouseYSens():
- MouseData = Bladex.GetMouseState()
- return int(MouseData[2])
-
-
- def SetMouseYSens(v):
- MouseData = Bladex.GetMouseState()
- Bladex.SetMouseState(MouseData[0], MouseData[1], v)
- KeybWidget.SaveListConfig()
-
-
- def ResetKeyB(option):
- _MainMenu.DeActivateMenuItem()
- acts.ResetDefaultControls()
- if KeybWidget.AdditionalKeysCallBack:
- KeybWidget.AdditionalKeysCallBack()
-
- _MainMenu.ActivateMenuItem()
-
-
- def SetDeFacingValue(v):
- return Bladex.SetAecGap(v)
-
- CurrentScorerVar = 'Full'
-
- def CurrentScorer():
- if CurrentScorerVar == 'Full':
- return 0
-
- if CurrentScorerVar == 'Auto':
- return 1
-
-
-
- def SetScorer(option):
- global CurrentScorerVar
- import Scorer
- if option == 'Full':
- Scorer.PowDefWidgets.Activate()
- Scorer.wKeysFrame.SetVisible(1)
- Scorer.wKeysRFrame.SetVisible(1)
- Scorer.wSpecialsFrame.SetVisible(1)
- Scorer.wEnemiesFrame.SetVisible(1)
- Scorer.wObjectsFrame.SetVisible(1)
- Scorer.wArrowInfo.SetVisible(1)
- elif option == 'Auto':
- Scorer.wLeftHand.SetVisible(0)
- Scorer.wRightHand.SetVisible(0)
- Scorer.PowDefWidgets.Deactivate()
- Scorer.wKeysFrame.SetVisible(0)
- Scorer.wKeysRFrame.SetVisible(0)
- Scorer.wSpecialsFrame.SetVisible(0)
- Scorer.wEnemiesFrame.SetVisible(0)
- Scorer.wObjectsFrame.SetVisible(0)
- Scorer.wArrowInfo.SetVisible(0)
-
- CurrentScorerVar = option
- SaveConfiguration()
-
-
- def CheckGorePassWord():
- print 'Checking Password'
- return CORRECT_GORE_PASSWORD == GORE_PASSWORD
-
-
- def Empty():
- return ''
-
-
- def SetPass(name):
- global GORE_PASSWORD
- GORE_PASSWORD = name
-
-
- def SetNewPass(name):
- global NEW_GORE_PASSWORD
- NEW_GORE_PASSWORD = name
-
-
- def SetConfNewPass(name):
- global CONFIRM_GORE_PASSWORD
- CONFIRM_GORE_PASSWORD = name
-
-
- def SaveConfiguration():
- cfgfile = open('../../Config/GameCfg.py', 'w')
- cfgfile.write('\n# Configuration settings... be carefull!\n\n\n')
- cfgfile.write('Bladex.SetBloodLevel(' + `Bladex.GetBloodLevel()` + ')\n')
- cfgfile.write('Bladex.SetMutilationLevel(' + `Bladex.GetMutilationLevel()` + ')\n')
- cfgfile.write('Bladex.SetDrawObjectShadows(' + `Bladex.GetDrawObjectShadows()` + ')\n')
- cfgfile.write('Bladex.SetAutoEngageCombat(' + `Bladex.GetAutoEngageCombat()` + ')\n')
- cfgfile.write('Bladex.SetAecGap(' + `Bladex.GetAecGap()` + ')\n')
- cfgfile.write('Blood.Evaporation = ' + `Blood.Evaporation` + '\n')
- cfgfile.write('SetScorer(' + `CurrentScorerVar` + ')\n')
- cfgfile.write('\n# Achalay my brother!.\n\n\n')
- cfgfile.close()
- print 'Game options Saved.'
-
-
- def SetBlood(option):
- if option == 'Yes':
- Bladex.SetBloodLevel(1)
- else:
- Bladex.SetBloodLevel(0)
- SaveConfiguration()
-
-
- def BloodSettings():
- if Bladex.GetBloodLevel():
- return 0
- else:
- return 1
-
-
- def SetMutilation(option):
- if option == 'Yes':
- Bladex.SetMutilationLevel(1)
- else:
- Bladex.SetMutilationLevel(0)
- SaveConfiguration()
-
-
- def MutilationSettings():
- if Bladex.GetMutilationLevel():
- return 0
- else:
- return 1
-
-
- def SetShadows(option):
- if option == 'Yes':
- Bladex.SetDrawObjectShadows(1)
- else:
- Bladex.SetDrawObjectShadows(0)
- SaveConfiguration()
-
-
- def ShadowsSettings():
- if Bladex.GetDrawObjectShadows():
- return 0
- else:
- return 1
-
-
- def SetBloodEvaporation(option):
- a = Bladex.GetCurrentMap()
- lar = len(a)
- if lar > 5:
- a = a[lar - 4:lar]
- else:
- a = ''
- if string.upper(a) != 'BACK':
- if option == 'Active':
- Blood.Evaporation = 1
- else:
- Blood.Evaporation = 0
- SaveConfiguration()
-
-
-
- def BloodEvaporationSettings():
- if Blood.Evaporation:
- return 0
- else:
- return 1
-
-
- def GetGammaValue():
- return Raster.GetGammaCorrection()
-
-
- def SetGammaValue(v):
- Raster.SetGammaCorrection(v)
-
-
- def GetBrightnessValue():
- return Raster.GetBrightness()
-
-
- def SetBrightnessValue(v):
- Raster.SetBrightness(v)
-
-
- def GetContrastValue():
- return Raster.GetContrast()
-
-
- def SetContrastValue(v):
- Raster.SetContrast(v)
-
-
- def ResetVideo(option):
- _MainMenu.DeActivateMenuItem()
- Raster.SetGammaCorrection(0)
- Raster.SetBrightness(0)
- Raster.SetContrast(1)
- _MainMenu.ActivateMenuItem()
-
-
- def GetSoundValue():
- return int(10 * Bladex.GetSoundVolume())
-
-
- def SetSoundValue(v):
- global sound_cfg_changed
- sound_cfg_changed = 1
- return Bladex.SetSoundVolume(v * 0.1)
-
-
- def GetMusicValue():
- return int(10 * Bladex.GetMusicVolume())
-
-
- def SetMusicValue(v):
- global sound_cfg_changed
- sound_cfg_changed = 1
- return Bladex.SetMusicVolume(v * 0.1)
-
-
- def GetSoundQuality():
- global last_ss_quality
- last_ss_quality = Bladex.GetSSQuality()
- return Bladex.GetSSQuality()
-
-
- def SetSoundQuality(option):
- global last_ss_quality, last_ss_quality, last_ss_quality
- if option == 'High':
- last_ss_quality = 2
- return 2
-
- if option == 'Med':
- last_ss_quality = 1
- return 1
-
- if option == 'Low':
- last_ss_quality = 0
- return 0
-
-
-
- def GetEAX():
- return Bladex.GetEAXOverride()
-
-
- def SetEAX(option):
- global sound_cfg_changed
- sound_cfg_changed = 1
- if option == 'Enabled':
- Bladex.SetEAXOverride(0)
-
- if option == 'Disabled':
- Bladex.SetEAXOverride(1)
-
-
-
- def GetSpeakerConfig():
- return Bladex.GetSpeakerConfig()
-
-
- def SetSpeakerConfig(option):
- global sound_cfg_changed
- sound_cfg_changed = 1
- if option == '4':
- Bladex.SetSpeakerConfig(3)
- return 3
-
- if option == '2':
- Bladex.SetSpeakerConfig(1)
- return 1
-
- if option == '2 + Subwoofer':
- Bladex.SetSpeakerConfig(2)
- return 2
-
- if option == 'Earphones':
- Bladex.SetSpeakerConfig(0)
- return 0
-
-
-
- def GetDeFacingValue():
- return int(Bladex.GetAecGap())
-
-
- def SetDeFacingValue(v):
- i = Bladex.SetAecGap(v)
- SaveConfiguration()
- return i
-
- _MainMenu = None
-
- def ActivateMenu():
- global _MainMenu
-
- try:
- AppMode = Bladex.GetAppMode()
- except x:
- print 'Error getting AppMode', x
-
- if AppMode == 'Game' or AppMode == 'Demo':
- if AppMode == 'Demo':
- import Demo_Stuff
- if Demo_Stuff.demo_is_active == 1:
- print 'ERROR - Menu.ActivateMenu()'
- print 'Fix with a path but should NOT happen!!!'
- Demo_Stuff.DemoLoop()
- return None
-
-
- _MainMenu = MainMenu('Menu Principal', Desc1)
- NetMisc.SetMainMenu(_MainMenu)
- _MainMenu.MenuStack.Push(_MainMenu.wMenu)
- InputManager = BInput.GetInputManager()
- oldInputActionsSet = InputManager.GetInputActionsSet()
- InputManager.SetInputActionsSet('Menu')
- Bladex.AddInputAction('Menu Next', 0)
- Bladex.AddInputAction('Menu Prev', 0)
- Bladex.AddInputAction('Menu Inc', 0)
- Bladex.AddInputAction('Menu Dec', 0)
- Bladex.AddInputAction('Menu ActivateItem', 0)
- Bladex.AddInputAction('Menu DeActivateItem', 0)
- Bladex.AddInputAction('Menu Supr', 0)
- Bladex.AddInputAction('Menu Next Strong', 0)
- Bladex.AssocKey('Menu Next', 'Keyboard', 'Down')
- Bladex.AddBoundFunc('Menu Next', _MainMenu.MenuNextItem)
- Bladex.AssocKey('Menu Prev', 'Keyboard', 'Up')
- Bladex.AddBoundFunc('Menu Prev', _MainMenu.MenuPrevItem)
- Bladex.AssocKey('Menu Inc', 'Keyboard', 'Right')
- Bladex.AddBoundFunc('Menu Inc', _MainMenu.MenuIncItem)
- Bladex.AssocKey('Menu Dec', 'Keyboard', 'Left')
- Bladex.AddBoundFunc('Menu Dec', _MainMenu.MenuDecItem)
- Bladex.AssocKey('Menu Supr', 'Keyboard', 'Delete')
- Bladex.AddBoundFunc('Menu Supr', _MainMenu.MenuSuprItem)
- Bladex.AssocKey('Menu ActivateItem', 'Keyboard', 'Enter')
- Bladex.AddBoundFunc('Menu ActivateItem', _MainMenu.ActivateMenuItem)
- Bladex.AssocKey('Menu DeActivateItem', 'Keyboard', 'Esc')
- Bladex.AssocKey('Menu DeActivateItem', 'Keyboard', 'F1')
- Bladex.AddBoundFunc('Menu DeActivateItem', _MainMenu.DeActivateMenuItem)
- Bladex.AssocKey('Menu Next Strong', 'Keyboard', 'Tab')
- Bladex.AddBoundFunc('Menu Next Strong', _MainMenu.MenuNextItemStrong)
- InputManager = BInput.GetInputManager()
- InputManager.SetInputActionsSet('Menu')
- if Reference.DEMO_MODE == 0:
- if netgame.GetNetState() == 0:
- SaveGame.CreateSaveMenu()
-
-
- elif AppMode == 'Menu':
- Bladex.AddScheduledFunc(Bladex.GetTime(), ClearMenuKeyb, ())
- Bladex.SetAppMode('Game')
- if netgame.GetNetState() == 0:
- import Scorer
- Scorer.ActivateScorer()
- else:
- NetScorer.ActivateScorer()
- Raster.SetTextMode(3)
- else:
- print 'Invalid AppMode'
- print 'End ActivateMenu()'
-
-
- def PreActivateMenu():
- Bladex.AddScheduledFunc(Bladex.GetTime(), ActivateMenu, (), 'ActivateMenu')
-
-
- def ClearMenuKeyb():
- global _MainMenu
- InputManager = BInput.GetInputManager()
- InputManager.SetInputActionsSet('Menu')
- Bladex.RemoveInputAction('Menu Next')
- Bladex.RemoveInputAction('Menu Prev')
- Bladex.RemoveInputAction('Menu Inc')
- Bladex.RemoveInputAction('Menu Dec')
- Bladex.RemoveInputAction('Menu ActivateItem')
- Bladex.RemoveInputAction('Menu DeActivateItem')
- Bladex.RemoveInputAction('Menu Supr')
- Bladex.RemoveInputAction('Menu Next Strong')
- _MainMenu = None
- InputManager.SetInputActionsSet('Default')
-
- wNULL_MenuParent = BUIx.CreateNULLWidget()
-
- class MainMenu:
-
- def __init__(self, Name, MenuDescription):
- self.Name = Name
- self.MenuDescription = MenuDescription
- self.MenuStack = MenuWidget.MenuStack(ActivateMenu)
- self.wMenu = MenuWidget.B_MenuTree(wNULL_MenuParent, self.MenuDescription, self.MenuStack)
- self.wMenu.SetAutoScale(1)
-
-
- def __del__(self):
- self.MenuStack.Reset()
- self.MenuStack = None
- self.wMenu = None
-
-
- def ActivateMenuItem(self):
- if Bladex.GetAppMode() == 'Menu':
- wActiveMenuElement = self.MenuStack.Top().GetFocus()
-
- try:
- sw = wActiveMenuElement.GetFocus()
- sw.ActivateItem(1)
- except:
- wActiveMenuElement.ActivateItem(1)
-
- SndNewMenu.PlayStereo()
-
-
-
- def DeActivateMenuItem(self):
- global sound_cfg_changed
- if Bladex.GetAppMode() == 'Menu':
- if self.MenuStack.nItems() == 1 and EscapeFunction != None:
- if EscapeFunction(0):
- return None
-
-
- wActiveMenuElement = self.MenuStack.Top().GetFocus()
-
- try:
- sw = wActiveMenuElement.GetFocus()
- sw.ActivateItem(0)
- except:
- wActiveMenuElement.ActivateItem(0)
-
- if last_ss_quality != -1 and last_ss_quality != Bladex.GetSSQuality():
- print 'Reseting sound quality'
- Bladex.SetSSQuality(last_ss_quality)
- elif sound_cfg_changed == 1:
- Bladex.SaveSSConfig()
- sound_cfg_changed = 0
-
- SndNewMenu.PlayStereo()
-
-
-
- def MenuNextItemStrong(self):
- w = self.MenuStack.Top()
- w.NextFocus()
-
-
- def MenuNextItem(self):
- w = self.MenuStack.Top()
- sw = w.GetFocus()
- if TBUDSoundAble:
- SndCorreGema.PlayStereo()
-
-
- try:
- sw.NextFocus()
- except:
- w.NextFocus()
-
-
-
- def MenuPrevItem(self):
- w = self.MenuStack.Top()
- sw = w.GetFocus()
- if TBUDSoundAble:
- SndCorreGema.PlayStereo()
-
-
- try:
- sw.PrevFocus()
- except:
- w.PrevFocus()
-
-
-
- def MenuIncItem(self):
- w = self.MenuStack.Top()
- sw = w.GetFocus()
-
- try:
- sw.IncMenuItem()
- except AttributeError:
-
- try:
- w.IncMenuItem()
- except AttributeError:
- pass
-
-
-
-
- def MenuDecItem(self):
- w = self.MenuStack.Top()
- sw = w.GetFocus()
-
- try:
- sw.DecMenuItem()
- except AttributeError:
-
- try:
- w.DecMenuItem()
- except AttributeError:
- pass
-
-
-
-
- def MenuSuprItem(self):
- print 'MenuSuprItem(self)'
- w = self.MenuStack.Top().GetFocus()
- sw = w.GetFocus()
-
- try:
- sw.SuprMenuItem()
- except:
- w.SuprMenuItem()
-
-
-
- def CommandPrb(self):
- print 'Method CommandPrb'
-
-
- def EndMenu(self):
- while len(self.MenuStack.Top()) > 0:
- self.DeActivateMenuItem()
-
-
- CtrlsPosition = (70, BUIx.B_FrameWidget.B_FR_AbsoluteLeft, BUIx.B_FrameWidget.B_FR_Left)
-
- def GoTo2d(menu_class):
- import GotoMapVars
- GotoMapVars.EndOfLevel()
-
- vsepexit = 200 - int(46 * ((600 - Raster.GetSize()[1]) / 120))
- if Reference.DEMO_MODE:
- QuitMenu = {
- 'VSep': 30,
- 'Name': MenuText.GetMenuText('EXIT'),
- 'Font': MenuFontBig,
- 'iFocus': 2,
- 'ListDescr': [
- {
- 'Name': MenuText.GetMenuText('Exit, Are you sure?'),
- 'VSep': vsepexit,
- 'Font': MenuFontBig,
- 'Kind': MenuWidget.B_MenuItemTextNoFXNoFocus },
- {
- 'Name': MenuText.GetMenuText('Yes'),
- 'VSep': 20,
- 'Font': MenuFontMed,
- 'ListDescr': [
- {
- 'Name': 'Features',
- 'Kind': MenuWidget.B_BackFeatures },
- {
- 'Name': ' ' }] },
- {
- 'Name': MenuText.GetMenuText('No'),
- 'VSep': 10,
- 'Font': MenuFontMed,
- 'Command': BackMenu },
- {
- 'Name': 'Back',
- 'Kind': MenuWidget.B_BackBlank }] }
- else:
- QuitMenu = {
- 'VSep': 130,
- 'Name': MenuText.GetMenuText('EXIT'),
- 'Font': MenuFontBig,
- 'iFocus': 2,
- 'ListDescr': [
- {
- 'Name': MenuText.GetMenuText('Exit, Are you sure?'),
- 'VSep': vsepexit,
- 'Font': MenuFontBig,
- 'Kind': MenuWidget.B_MenuItemTextNoFXNoFocus },
- {
- 'Name': MenuText.GetMenuText('Yes'),
- 'VSep': 20,
- 'Command': CmdQuit,
- 'Font': MenuFontMed },
- {
- 'Name': MenuText.GetMenuText('No'),
- 'VSep': 10,
- 'Font': MenuFontMed,
- 'Command': BackMenu },
- {
- 'Name': 'Back',
- 'Kind': MenuWidget.B_BackBlank }] }
- PlayerConfigMenu = [
- {
- 'Name': MenuText.GetMenuText('NAME:'),
- 'VSep': 30,
- 'Kind': netwidgets.B_InputBox,
- 'MaxSize': 16,
- 'GetInput': NetMisc.GetPlayerName,
- 'SetInput': NetMisc.SetPlayerName },
- {
- 'Name': MenuText.GetMenuText('CHARACTER:'),
- 'Font': MenuFontMed,
- 'Kind': MenuWidget.B_MenuItemOption,
- 'Options': [
- MenuText.GetMenuText('Knight'),
- MenuText.GetMenuText('Barbarian'),
- MenuText.GetMenuText('Dwarf'),
- MenuText.GetMenuText('Amazon')],
- 'SelOptionFunc': NetMisc.GetCharType,
- 'Command': NetMisc.SetCharType },
- {
- 'Name': 'Lista de jugadores',
- 'Kind': netwidgets.B_ImageListWidget,
- 'ImageList': NetMisc.CharBitmaps,
- 'GetCharType': NetMisc.GetCharStatus,
- 'VSep': 30 },
- {
- 'Name': MenuText.GetMenuText('Next Skin'),
- 'VSep': 30,
- 'Command': NetMisc.NextSkin },
- {
- 'Name': MenuText.GetMenuText('Level') + ':',
- 'Kind': MenuWidget.B_MenuSpin,
- 'SpinValues': (1, 4, 3),
- 'SpinGetValue': NetMisc.GetHandicap,
- 'SpinSetValueEnd': NetMisc.SetHandicap },
- {
- 'Name': MenuText.GetMenuText('Save'),
- 'Command': NetMisc.SavePlayerConfiguration },
- {
- 'Name': 'Back',
- 'Kind': MenuWidget.B_BackBlank }]
-
- def MapLoading(option):
- if Character == 0:
- Bladex.LoadLevel('Ruins_M4')
-
- if Character == 1:
- Bladex.LoadLevel('Barb_M1')
-
- if Character == 2:
- Bladex.LoadLevel('Ragnar_M2')
-
- if Character == 3:
- Bladex.LoadLevel('Dwarf_M3')
-
-
- TutGameChoosing = {
- 'Name': 'TopMenu',
- 'Kind': MenuWidget.B_MenuItemTextNoFX,
- 'ListDescr': [
- {
- 'Name': MenuText.GetMenuText('ENTER TUTORIAL'),
- 'VSep': 180,
- 'Font': MenuFontBig,
- 'Command': LoadTutorial },
- {
- 'Name': MenuText.GetMenuText('CONTINUE'),
- 'Font': MenuFontBig,
- 'Command': MapLoading },
- BackOption,
- {
- 'Name': 'Back',
- 'Kind': MenuWidget.B_BackImageWidget }] }
- NormalMenu = 1
-
- def GetPasswordMenu():
- if CORRECT_GORE_PASSWORD == '':
- return ParentalLockOffMenu
- else:
- return ParentalLockOnMenu
-
-
- def SwitchParentalLock(Option):
- global CORRECT_GORE_PASSWORD, GORE_PASSWORD, GORE_PASSWORD, CORRECT_GORE_PASSWORD, GORE_PASSWORD
- print 'Hola!'
- parl = GetMenuItem([
- 'OPTIONS',
- 'GORE'])
- if parl['ListDescr'][0] == ParentalLockOffMenu:
- if NEW_GORE_PASSWORD == CONFIRM_GORE_PASSWORD and CONFIRM_GORE_PASSWORD != '':
- CORRECT_GORE_PASSWORD = NEW_GORE_PASSWORD
- GORE_PASSWORD = CORRECT_GORE_PASSWORD
- SavePasswordFile()
- _MainMenu.DeActivateMenuItem()
- _MainMenu.DeActivateMenuItem()
- parl['ListDescr'][0] = ParentalLockOnMenu
- GORE_PASSWORD = ''
- Bladex.SetBloodLevel(0)
- Bladex.SetMutilationLevel(0)
- SaveConfiguration()
- _MainMenu.ActivateMenuItem()
-
- elif CORRECT_GORE_PASSWORD == GORE_PASSWORD:
- _MainMenu.DeActivateMenuItem()
- _MainMenu.DeActivateMenuItem()
- parl['ListDescr'][0] = ParentalLockOffMenu
- CORRECT_GORE_PASSWORD = ''
- GORE_PASSWORD = ''
- SavePasswordFile()
- _MainMenu.ActivateMenuItem()
-
-
- ParentalLockOnMenu = {
- 'Name': MenuText.GetMenuText('Parental Lock ON'),
- 'VSep': 200,
- 'Font': MenuFontBig,
- 'ListDescr': [
- {
- 'Name': MenuText.GetMenuText('Password:'),
- 'VSep': 185,
- 'Kind': netwidgets.B_InputBox,
- 'MaxSize': 8,
- 'GetInput': Empty,
- 'SetInput': SetPass,
- 'PasswordChar': '#' },
- {
- 'Name': MenuText.GetMenuText('Accept'),
- 'VSep': 50,
- 'Font': MenuFontBig,
- 'Command': SwitchParentalLock },
- BackOption,
- {
- 'Name': 'Back',
- 'Kind': MenuWidget.B_BackImageWidget }] }
- ParentalLockOffMenu = {
- 'Name': MenuText.GetMenuText('Parental Lock OFF'),
- 'VSep': 200,
- 'Font': MenuFontBig,
- 'ListDescr': [
- {
- 'Name': MenuText.GetMenuText('New Password:'),
- 'Kind': netwidgets.B_InputBox,
- 'VSep': 185,
- 'MaxSize': 8,
- 'GetInput': Empty,
- 'SetInput': SetNewPass,
- 'PasswordChar': '#' },
- {
- 'Name': MenuText.GetMenuText('Confirm New Password:'),
- 'Kind': netwidgets.B_InputBox,
- 'MaxSize': 8,
- 'GetInput': Empty,
- 'SetInput': SetConfNewPass,
- 'PasswordChar': '#' },
- {
- 'Name': MenuText.GetMenuText('Accept'),
- 'VSep': 50,
- 'Font': MenuFontBig,
- 'Command': SwitchParentalLock },
- BackOption,
- {
- 'Name': 'Back',
- 'Kind': MenuWidget.B_BackImageWidget }] }
-
- def SwitchCasaByGlobalMenu():
- global Desc1, TutGameChoosing
- DescAux = Desc1
- Desc1 = TutGameChoosing
- TutGameChoosing = DescAux
- DescAux = None
-
-
- def SwitchToCasaMenu():
- global NormalMenu
- if NormalMenu:
- NormalMenu = 0
- SwitchCasaByGlobalMenu()
- if Reference.DEMO_MODE:
- GetMenuItem([
- 'ENTER TUTORIAL'])['Kind'] = MenuWidget.B_MenuItemTextNoFXNoFocus
-
-
-
-
- def SwitchToGlobalMenu():
- global NormalMenu
- if not NormalMenu:
- NormalMenu = 1
- SwitchCasaByGlobalMenu()
-
-
- if netgame.GetNetState() != 0:
- PlayerConfigMenu.insert(6, {
- 'Name': MenuText.GetMenuText('This modification will take effect in the next arena'),
- 'VSep': 20,
- 'Font': MenuFontSmall,
- 'Kind': MenuWidget.B_MenuItemTextNoFXNoFocus })
- Desc1 = {
- 'Name': 'TopMenu',
- 'Kind': MenuWidget.B_MenuItemTextNoFX,
- 'ListDescr': [
- {
- 'Name': MenuText.GetMenuText('Disconnect'),
- 'VSep': 220,
- 'Font': MenuFontBig,
- 'Command': NetMisc.Disconnect },
- {
- 'Name': MenuText.GetMenuText('Modify Player'),
- 'Font': MenuFontBig,
- 'ListDescr': PlayerConfigMenu },
- QuitMenu,
- {
- 'Name': 'Back',
- 'Kind': MenuWidget.B_BackImageWidget }] }
- else:
- Desc1 = {
- 'Name': 'TopMenu',
- 'Size': (640, 480),
- 'Kind': MenuWidget.B_MenuItemTextNoFX,
- 'ListDescr': [
- {
- 'Name': MenuText.GetMenuText('GAME'),
- 'Font': MenuFontBig,
- 'VSep': 100,
- 'Size': (640, 480),
- 'ListDescr': [
- {
- 'Name': MenuText.GetMenuText('START NEW GAME'),
- 'Size': (640, 480),
- 'Font': MenuFontBig,
- 'VSep': 140,
- 'Command': LoadPlayerSelect },
- {
- 'Name': MenuText.GetMenuText('SAVE GAME'),
- 'Font': MenuFontBig,
- 'Size': (640, 480),
- 'ListDescr': [
- {
- 'Name': MenuText.GetMenuText('Savegame Slot 1:'),
- 'Font': MenuFontBig,
- 'VSep': 200,
- 'Command': SaveGame1 },
- {
- 'Name': MenuText.GetMenuText('Savegame Slot 2:'),
- 'Font': MenuFontBig,
- 'VSep': 20,
- 'Command': SaveGame2 },
- {
- 'Name': MenuText.GetMenuText('Savegame Slot 3:'),
- 'Font': MenuFontBig,
- 'VSep': 20,
- 'Command': SaveGame3 },
- {
- 'Name': MenuText.GetMenuText('Savegame Slot 4:'),
- 'Font': MenuFontBig,
- 'VSep': 20,
- 'Command': SaveGame4 },
- {
- 'Name': 'Back',
- 'Kind': MenuWidget.B_BackImageWidget }] },
- {
- 'Name': MenuText.GetMenuText('LOAD GAME'),
- 'Font': MenuFontBig,
- 'Size': (640, 480),
- 'ListDescr': [
- {
- 'Name': MenuText.GetMenuText('Load Game at Slot 1:'),
- 'Font': MenuFontBig,
- 'VSep': 200,
- 'Command': LoadGame },
- {
- 'Name': MenuText.GetMenuText('Load Game at Slot 2:'),
- 'Font': MenuFontBig,
- 'VSep': 20,
- 'Command': LoadGame2 },
- {
- 'Name': MenuText.GetMenuText('Load Game at Slot 3:'),
- 'Font': MenuFontBig,
- 'VSep': 20,
- 'Command': LoadGame3 },
- {
- 'Name': MenuText.GetMenuText('Load Game at Slot 4:'),
- 'Font': MenuFontBig,
- 'VSep': 20,
- 'Command': LoadGame4 },
- {
- 'Name': 'Back',
- 'Kind': MenuWidget.B_BackImageWidget }] },
- {
- 'Name': MenuText.GetMenuText('ARENA'),
- 'Font': MenuFontBig,
- 'Size': (640, 480),
- 'VSep': 20,
- 'ListDescr': [
- {
- 'Name': MenuText.GetMenuText('Connection:'),
- 'Font': MenuFontMed,
- 'VSep': 150,
- 'Kind': MenuWidget.B_MenuItemOption,
- 'Options': [
- MenuText.GetMenuText('IPX (Local network)'),
- MenuText.GetMenuText('TCP/IP (Internet)')],
- 'SelOptionFunc': NetMisc.GetProtocol,
- 'Command': NetMisc.SetProtocol },
- {
- 'Name': MenuText.GetMenuText('NEW ARENA'),
- 'Size': (640, 480),
- 'Font': MenuFontBig,
- 'ListDescr': [
- {
- 'Name': MenuText.GetMenuText('Name:'),
- 'VSep': 20,
- 'Kind': netwidgets.B_InputBox,
- 'MaxSize': 16,
- 'GetInput': NetMisc.GetArenaName,
- 'SetInput': NetMisc.SetArenaName },
- {
- 'Name': 'Lista de mapas',
- 'Kind': netwidgets.B_MapListWidget,
- 'LeftMap': '../../Data/net/MapL.bmp',
- 'RightMap': '../../Data/net/MapR.bmp',
- 'SelMap': '../../Data/net/MapM.bmp',
- 'MarkMap': '../../Data/net/MapS.bmp',
- 'MapGetValue': NetMisc.GetArenaMaps,
- 'MapSetValue': NetMisc.SetArenaMaps,
- 'VSep': 15 },
- {
- 'Name': MenuText.GetMenuText('The bad place'),
- 'VSep': 1,
- 'Kind': netwidgets.B_DescriptorLabel },
- {
- 'Name': MenuText.GetMenuText('Max players:'),
- 'Kind': MenuWidget.B_MenuSpin,
- 'SpinValues': (2, 10, 8),
- 'SpinGetValue': NetMisc.GetMaxPlayers,
- 'SpinSetValueEnd': NetMisc.SetMaxPlayers,
- 'VSep': 30 },
- {
- 'Name': MenuText.GetMenuText('Max Level:'),
- 'Kind': MenuWidget.B_MenuSpin,
- 'SpinValues': (1, 4, 3),
- 'SpinGetValue': NetMisc.GetArenaHandicap,
- 'SpinSetValueEnd': NetMisc.SetArenaHandicap },
- {
- 'Name': MenuText.GetMenuText('Packets per second:'),
- 'Font': MenuFontMed,
- 'Kind': MenuWidget.B_MenuItemOption,
- 'Options': [
- MenuText.GetMenuText('Variable'),
- '10',
- '20',
- '30',
- '40',
- '50',
- '60'],
- 'SelOptionFunc': NetMisc.GetPPS,
- 'Command': NetMisc.SetPPS },
- {
- 'Name': MenuText.GetMenuText('Death Limit:'),
- 'Kind': MenuWidget.B_MenuSpin,
- 'SpinValues': (1, 51, 50),
- 'SpinGetValue': NetMisc.GetFragLimit,
- 'SpinSetValueEnd': NetMisc.SetFragLimit },
- {
- 'Name': MenuText.GetMenuText('START'),
- 'Command': NetMisc.StartServer },
- {
- 'Name': MenuText.GetMenuText('BACK'),
- 'VSep': 10,
- 'Command': BackMenu },
- {
- 'Name': 'Back',
- 'Kind': MenuWidget.B_BackBlank }] },
- {
- 'Name': MenuText.GetMenuText('JOIN GAME'),
- 'Size': (640, 480),
- 'Font': MenuFontBig,
- 'ListDescr': [
- {
- 'Name': MenuText.GetMenuText('Address:'),
- 'Kind': netwidgets.B_InputBox,
- 'MaxSize': 32,
- 'GetInput': NetMisc.GetIp,
- 'SetInput': NetMisc.SetIp,
- 'Locked': NetMisc.IpLooked,
- 'VSep': 120 },
- {
- 'Name': MenuText.GetMenuText('Search'),
- 'Command': NetMisc.BrowseServers },
- {
- 'Name': MenuText.GetMenuText("Server's list"),
- 'Kind': netwidgets.B_ServerListWidget,
- 'Size': (610, 200),
- 'ListDescr': [] },
- {
- 'Name': MenuText.GetMenuText('BACK'),
- 'VSep': 10,
- 'Command': BackMenu },
- {
- 'Name': 'Back',
- 'Kind': MenuWidget.B_BackBlank }] },
- {
- 'Name': MenuText.GetMenuText('PLAYER CONFIGURATION'),
- 'Font': MenuFontBig,
- 'ListDescr': PlayerConfigMenu },
- BackOption,
- {
- 'Name': 'Back',
- 'Kind': MenuWidget.B_BackImageWidget }] },
- BackOption,
- {
- 'Name': 'Back',
- 'Kind': MenuWidget.B_BackImageWidget }] },
- {
- 'Name': MenuText.GetMenuText('CONTROLS'),
- 'VSep': 10,
- 'Font': MenuFontBig,
- 'Size': (640, 480),
- 'ListDescr': [
- {
- 'Name': MenuText.GetMenuText('KEYBOARD/GAMEPAD'),
- 'VSep': 180,
- 'Size': (640, 480),
- 'Font': MenuFontBig,
- 'ListDescr': [
- {
- 'Name': MenuText.GetMenuText('CONFIGURE ACTIONS'),
- 'VSep': 180,
- 'Size': (640, 480),
- 'Font': MenuFontBig,
- 'ListDescr': [
- {
- 'Name': 'KeybList',
- 'Kind': KeybWidget.B_KeybListWidget,
- 'VSep': 120,
- 'Size': (610, 200),
- 'ListDescr': KeybActions },
- BackOption,
- {
- 'Name': 'Back',
- 'Kind': MenuWidget.B_BackImageWidget }] },
- BackOption,
- {
- 'Name': 'Back',
- 'Kind': MenuWidget.B_BackImageWidget }] },
- {
- 'Name': MenuText.GetMenuText('MOUSE'),
- 'Font': MenuFontBig,
- 'Size': (640, 480),
- 'ListDescr': [
- {
- 'Name': MenuText.GetMenuText('Invert'),
- 'VSep': 185,
- 'Font': MenuFontMed,
- 'Kind': MenuWidget.B_MenuItemOption,
- 'Options': [
- MenuText.GetMenuText('Yes'),
- MenuText.GetMenuText('No')],
- 'SelOptionFunc': GetMouseInvert,
- 'Command': SetMouseInvert },
- {
- 'Name': MenuText.GetMenuText('X Speed'),
- 'Font': MenuFontMed,
- 'Kind': MenuWidget.B_MenuSpin,
- 'SpinValues': (int(0), int(10), int(10)),
- 'SpinGetValue': GetMouseXSens,
- 'SpinSetValueEnd': SetMouseXSens },
- {
- 'Name': MenuText.GetMenuText('Y Speed'),
- 'Font': MenuFontMed,
- 'Kind': MenuWidget.B_MenuSpin,
- 'SpinValues': (int(0), int(10), int(10)),
- 'SpinGetValue': GetMouseYSens,
- 'SpinSetValueEnd': SetMouseYSens },
- BackOption,
- {
- 'Name': 'Back',
- 'Kind': MenuWidget.B_BackImageWidget }] },
- {
- 'Name': MenuText.GetMenuText('RESET TO DEFAULTS'),
- 'Font': MenuFontBig,
- 'Command': ResetKeyB },
- BackOption,
- {
- 'Name': 'Back',
- 'Kind': MenuWidget.B_BackImageWidget }] },
- {
- 'Name': MenuText.GetMenuText('OPTIONS'),
- 'VSep': 10,
- 'Font': MenuFontBig,
- 'Size': (640, 480),
- 'ListDescr': [
- {
- 'Name': MenuText.GetMenuText('VIDEO'),
- 'VSep': 120,
- 'Size': (640, 480),
- 'Font': MenuFontBig,
- 'ListDescr': [
- {
- 'Name': MenuText.GetMenuText('Gamma:'),
- 'VSep': 151,
- 'Font': MenuFontMed,
- 'Kind': MenuWidget.B_MenuSpin,
- 'SpinValues': (0.0, 1.0, 20),
- 'SpinGetValue': GetGammaValue,
- 'SpinOnChange': SetGammaValue,
- 'SpinSetValue': SetGammaValue },
- {
- 'Name': MenuText.GetMenuText('Contrast:'),
- 'VSep': 15,
- 'Font': MenuFontMed,
- 'Kind': MenuWidget.B_MenuSpin,
- 'SpinValues': (0.5, 4.0, 35),
- 'SpinGetValue': GetContrastValue,
- 'SpinOnChange': SetContrastValue,
- 'SpinSetValue': SetContrastValue },
- {
- 'Name': MenuText.GetMenuText('Brightness:'),
- 'VSep': 15,
- 'Font': MenuFontMed,
- 'Kind': MenuWidget.B_MenuSpin,
- 'SpinValues': (0.0, 50.0, 25),
- 'SpinGetValue': GetBrightnessValue,
- 'SpinOnChange': SetBrightnessValue,
- 'SpinSetValue': SetBrightnessValue },
- {
- 'Name': MenuText.GetMenuText('RESET COLOR CONTROL'),
- 'VSep': 15,
- 'Font': MenuFontMed,
- 'Command': ResetVideo },
- {
- 'Name': MenuText.GetMenuText('Character Shadows:'),
- 'VSep': 15,
- 'Font': MenuFontMed,
- 'Kind': MenuWidget.B_MenuItemOption,
- 'Options': [
- MenuText.GetMenuText('Yes'),
- MenuText.GetMenuText('No')],
- 'SelOptionFunc': ShadowsSettings,
- 'Command': SetShadows },
- BackOption,
- {
- 'Name': 'Back',
- 'Kind': MenuWidget.B_BackImageWidget }] },
- {
- 'Name': MenuText.GetMenuText('SOUND'),
- 'VSep': 10,
- 'Font': MenuFontBig,
- 'Size': (640, 480),
- 'ListDescr': [
- {
- 'Name': MenuText.GetMenuText('FX Volume:'),
- 'VSep': 152,
- 'Font': MenuFontMed,
- 'Kind': MenuWidget.B_MenuSpin,
- 'SpinValues': (int(0), int(10), int(10)),
- 'SpinGetValue': GetSoundValue,
- 'SpinSetValueEnd': SetSoundValue },
- {
- 'Name': MenuText.GetMenuText('Music Volume:'),
- 'VSep': 10,
- 'Font': MenuFontMed,
- 'Kind': MenuWidget.B_MenuSpin,
- 'SpinValues': (int(0), int(10), int(10)),
- 'SpinGetValue': GetMusicValue,
- 'SpinSetValueEnd': SetMusicValue },
- {
- 'Name': MenuText.GetMenuText('Sound Quality:'),
- 'VSep': 10,
- 'Font': MenuFontMed,
- 'Kind': MenuWidget.B_MenuItemOption,
- 'Options': [
- MenuText.GetMenuText('Low'),
- MenuText.GetMenuText('Med'),
- MenuText.GetMenuText('High')],
- 'SelOptionFunc': GetSoundQuality,
- 'Command': SetSoundQuality },
- {
- 'Name': MenuText.GetMenuText('EAX:'),
- 'VSep': 10,
- 'Font': MenuFontMed,
- 'Options': [
- MenuText.GetMenuText('Disabled'),
- MenuText.GetMenuText('Enabled')],
- 'Kind': MenuWidget.B_MenuItemOption,
- 'SelOptionFunc': GetEAX,
- 'Command': SetEAX },
- {
- 'Name': MenuText.GetMenuText('EAX (FOR IMPROVED ENVIRONMENTAL REALISM)'),
- 'VSep': 5,
- 'Font': MenuFontSmall,
- 'Kind': MenuWidget.B_MenuItemTextNoFXNoFocus },
- {
- 'Name': MenuText.GetMenuText('Speaker Configuration:'),
- 'VSep': 10,
- 'Font': MenuFontMed,
- 'Options': [
- MenuText.GetMenuText('Earphones'),
- MenuText.GetMenuText('2'),
- MenuText.GetMenuText('2 + Subwoofer'),
- MenuText.GetMenuText('4')],
- 'Kind': MenuWidget.B_MenuItemOption,
- 'SelOptionFunc': GetSpeakerConfig,
- 'Command': SetSpeakerConfig },
- BackOption,
- {
- 'Name': 'Back',
- 'Kind': MenuWidget.B_BackImageWidget }] },
- {
- 'Name': MenuText.GetMenuText('GORE'),
- 'VSep': 10,
- 'Font': MenuFontBig,
- 'ListDescr': [
- GetPasswordMenu(),
- {
- 'VSep': 20,
- 'Name': MenuText.GetMenuText('Blood:'),
- 'Font': MenuFontBig,
- 'Kind': MenuWidget.B_MenuItemOption,
- 'Options': [
- MenuText.GetMenuText('Yes'),
- MenuText.GetMenuText('No')],
- 'Command': SetBlood,
- 'SelOptionFunc': BloodSettings,
- 'CheckPass': CheckGorePassWord },
- {
- 'Name': MenuText.GetMenuText('Mutilations:'),
- 'Font': MenuFontBig,
- 'Kind': MenuWidget.B_MenuItemOption,
- 'Options': [
- MenuText.GetMenuText('Yes'),
- MenuText.GetMenuText('No')],
- 'Command': SetMutilation,
- 'SelOptionFunc': MutilationSettings,
- 'CheckPass': CheckGorePassWord },
- BackOption,
- {
- 'Name': 'Back',
- 'Kind': MenuWidget.B_BackImageWidget }] },
- {
- 'Name': MenuText.GetMenuText('AUTO LOCK ON:'),
- 'VSep': 30,
- 'Font': MenuFontBig,
- 'Kind': MenuWidget.B_MenuItemOption,
- 'Options': [
- MenuText.GetMenuText('No'),
- MenuText.GetMenuText('Yes')],
- 'Command': SetFacing,
- 'SelOptionFunc': GetFacing },
- BackOption,
- {
- 'Name': 'Back',
- 'Kind': MenuWidget.B_BackImageWidget }] },
- {
- 'Name': MenuText.GetMenuText('CREDITS'),
- 'VSep': 10,
- 'Size': (640, 480),
- 'Font': MenuFontBig,
- 'ListDescr': [
- {
- 'Name': 'Credits',
- 'Kind': Credits.B_CreditsImageWidget,
- 'ImageList': Credits.BitmapsNames }] },
- QuitMenu,
- {
- 'Name': 'Back',
- 'Size': (640, 480),
- 'Kind': MenuWidget.B_BackImageWidget }] }
- if 'Casa' != Bladex.GetCurrentMap():
- Desc1['ListDescr'].insert(1, {
- 'Name': MenuText.GetMenuText('BACK TO GAME'),
- 'Font': MenuFontBig,
- 'Command': BackMenu })
-
-
- def BackMap():
- Desc1['ListDescr'].insert(len(Desc1['ListDescr']) - 1, {
- 'Name': MenuText.GetMenuText('Leave Rune Quest'),
- 'Font': MenuFontBig,
- 'Command': GoTo2d,
- 'VSep': 20 })
-
-
- def GetMenuItem(way):
- idx = 0
- continueflag = 1
- MenuLevel = Desc1
- ReturnValue = 1
- while continueflag:
- continueflag = 0
- for val in MenuLevel['ListDescr']:
- if val.has_key('Name'):
- print 'see', val['Name']
- if MenuText.GetInverseMenuText(val['Name']) == way[idx]:
- idx = idx + 1
- if len(way) == idx:
- ReturnValue = val
- elif val.has_key('ListDescr'):
- continueflag = 1
- MenuLevel = val
- print 'Searching at', val['Name']
- else:
- print val['Name'], 'is not a list'
- break
-
-
-
- MenuLevel = None
- return ReturnValue
-
-
- def InitMenuKeys():
- Raster.SetTextMode(3)
- InputManager = BInput.GetInputManager()
- InputManager.AddInputActionsSet('MenuRedefine')
- InputManager.AddInputActionsSet('Menu')
- oldInputActionsSet = InputManager.GetInputActionsSet()
- InputManager.SetInputActionsSet('Menu')
- InputManager.SetInputActionsSet('Default')
- Bladex.AddInputAction('Activate Menu', 0)
- Bladex.AssocKey('Activate Menu', 'Keyboard', 'Esc')
- Bladex.AddBoundFunc('Activate Menu', PreActivateMenu)
- InputManager.SetInputActionsSet(oldInputActionsSet)
- print 'Activadas!'
- if Reference.DEMO_MODE == 1:
- GetMenuItem([
- 'CREDITS'])['Kind'] = MenuWidget.B_MenuItemTextNoFXNoFocus
- del GetMenuItem([
- 'CREDITS'])['ListDescr']
- GetMenuItem([
- 'GAME',
- 'SAVE GAME'])['Kind'] = MenuWidget.B_MenuItemTextNoFXNoFocus
- del GetMenuItem([
- 'GAME',
- 'SAVE GAME'])['ListDescr']
- GetMenuItem([
- 'GAME',
- 'LOAD GAME'])['Kind'] = MenuWidget.B_MenuItemTextNoFXNoFocus
- del GetMenuItem([
- 'GAME',
- 'LOAD GAME'])['ListDescr']
- GetMenuItem([
- 'GAME',
- 'ARENA'])['Kind'] = MenuWidget.B_MenuItemTextNoFXNoFocus
- del GetMenuItem([
- 'GAME',
- 'ARENA'])['ListDescr']
- GetMenuItem([
- 'GAME',
- 'START NEW GAME'])['Name'] = MenuText.GetMenuText('START GAME')
- GetMenuItem([
- 'CONTROLS',
- 'KEYBOARD/GAMEPAD'])['Name'] = MenuText.GetMenuText('KEYBOARD')
-
-
-
- try:
- execfile('../../Config/GameCfg.py')
- print 'Menu.py -> Executed GameCfg.py'
- except:
- print 'Menu.py -> No GameCfg.py found'
-
-